package com.jason.www;


import com.jason.www.annotation.ResubmitLock;
import com.jason.www.pojo.Order;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/test")
public class TestController {

    @ResubmitLock(key = "TestController:resumbitTest")
    @PostMapping("/resumbit")
    public String resumbitTest(@RequestBody Order order){
        System.out.println("执行生成订单的逻辑:" + order.toString());
        return "OK";
    }
}
